import {
	getWorkOrderListByFws,
	getWorkOrderListByFwsTy
} from '../../api/workOrder.js'

export default {
	state: {
		preStartDetail: {},
		// preStartDetailDraft:{}
	},
	mutations: {
		setPreStartDetail(state, payload) {
			state.preStartDetail = payload
		},
		// setPreStartDetailDraft(state,payload){
		// 	state.preStartDetailDraft=payload
		// }
		
		
	},
	getters: {

	},
	actions: {
		getWorkOrderListByFws({}, payload) {
			return new Promise((resolve, reject) => {
				getWorkOrderListByFws(payload).then(res => {
					resolve(res)
				}).catch(err => {
					reject(err)
				})
			})
		},
		getWorkOrderListByFwsTy({}, payload) {
			return new Promise((resolve, reject) => {
				getWorkOrderListByFwsTy(payload).then(res => {
					resolve(res)
				}).catch(err => {
					reject(err)
				})
			})
		},
	},
	namespaced: true
}
